<script type="text/javascript" src="external/editer/external/jquery.hotkeys.js"></script><script type="text/javascript" src="external/editer/bootstrap-wysiwyg.js"></script><link rel="stylesheet" type="text/css" href="external/editer/index.css"><script type="text/javascript" src="{$smarty.const.THEME_RELATIVE}admin/js/quiz_edit.js"></script>
<div class="hero-unit">
<form id="quiz_edit" action="index.php">
    <h1>Add new quiz <br/> <small>Quick add quiz</small></h1>
    <hr/>
    Name<br>
    <input type="text" id="name" value="{$coll->name}"><br>
    Description<br>
    <textarea id="description" cols="40" rows="7">{$coll->name}</textarea><br>
    Default type<br>
    
    <select id="default_type">
    <option value="0" {if $coll->default_type==0}selected{/if}>Trắc nghiệm chọn 1</option>
    <option value="1" {if $coll->default_type==1}selected{/if}>Trắc nghiệm chọn nhiều</option>
    </select><br>
    <!-- Begin editer -->
    
    <div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor">
      <div class="btn-group">
        <a class="btn" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="icon-bold"></i></a>
        <a class="btn" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="icon-italic"></i></a>
        <a class="btn" data-edit="strikethrough" title="Strikethrough"><i class="icon-strikethrough"></i></a>
        <a class="btn" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="icon-underline"></i></a>
      </div>
      <div class="btn-group">
      <a class="btn" data-edit="insertHTML" title="Thêm một câu mẫu hoàn chỉnh" rel="<hr>{$smarty.const.QUIZ_NEW}Câu_hỏi_1 (Điểm {$smarty.const.QUIZ_POINT}10) độ khó {$smarty.const.QUIZ_DIFF}5<br>{$smarty.const.QUIZ_ANS}Trả_lời_1<br>{$smarty.const.QUIZ_ANS}Trả_lời_2<br>{$smarty.const.QUIZ_ANS}Trả_lời_3_giả_sử_đúng {$smarty.const.QUIZ_RIGHT}<br>{$smarty.const.QUIZ_ANS}Trả_lời_4"><i class="icon-tasks"></i></a>
        <a class="btn" data-edit="insertHTML" title="Thêm một câu hỏi" rel="<hr>{$smarty.const.QUIZ_NEW}"><i class="icon-plus"></i></a>
        <a class="btn" data-edit="insertHTML" title="Thêm điểm của câu hỏi" rel="{$smarty.const.QUIZ_POINT}"><i class="icon-star"></i></a>
        <a class="btn" data-edit="insertHTML" title="Độ khó(1-10)" rel="{$smarty.const.QUIZ_DIFF}"><i class="icon-check" ></i></a>
        <a class="btn" data-edit="insertHTML" title="Thêm câu trả lời" rel="{$smarty.const.QUIZ_ANS}"><i class="icon-plus-sign"></i></a>
                <a class="btn" data-edit="insertHTML" title="Câu đúng" rel="{$smarty.const.QUIZ_RIGHT}"><i class="icon-check" ></i></a>
        
      </div>
      
      <div class="btn-group">
        <a class="btn" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i class="icon-undo"></i></a>
        <a class="btn" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i class="icon-repeat"></i></a>
      </div>

    </div>

            <div id="editor">
            {if $new}
            {$smarty.const.QUIZ_NEW}Câu_hỏi_1 (Điểm {$smarty.const.QUIZ_POINT}10)<br>{$smarty.const.QUIZ_ANS}Trả_lời_1<br>{$smarty.const.QUIZ_ANS}Trả_lời_2<br>{$smarty.const.QUIZ_ANS}Trả_lời_3_giả_sử_đúng {$smarty.const.QUIZ_RIGHT}<br>{$smarty.const.QUIZ_ANS}Trả_lời_4<br>
            {else}
            {$quiz_str}
            {/if}
          </div>
  </div><br>
  <input id="submit" class="btn" type="button" value="Add"> 
  </form>
  <br>
  <div id="test_result">
    
  </div>
  
  <script type="text/javascript">
  var _quiz_id='{if $new}0{else}{$coll->id}{/if}';
  var quiz_new= "{$smarty.const.QUIZ_NEW}";
  var quiz_point= "{$smarty.const.QUIZ_POINT}";
  var quiz_ans= "{$smarty.const.QUIZ_ANS}";
  var quiz_right= "{$smarty.const.QUIZ_RIGHT}";
  var quiz_default_diff= "{$smarty.const.QUIZ_DEFAULT_DIFF}";
  var quiz_max_quiz= "{$smarty.const.QUIZ_MAX_QUIZ}";
  var quiz_min_length= "{$smarty.const.QUIZ_MIN_LENGTH}";
  
  </script>
  
  